package Class_03_01;

import java.util.Scanner;

public class homework4 {
    public static void main(String[] args) {
        //键盘输入5个整数，求其中的最小值，并输出最小值的位置
        int[] arr = new int[5];
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < 5; i++)
        {
            arr[i] = sc.nextInt();
        }
        int min = arr[0];
        int index = 0;
        for(int i = 0;i < arr.length; i++)
        {
            if(arr[i] < min)
            {
                min = arr[i];
                index = i;
            }
        }
        System.out.println("该数组中最小值为" + min + "该数字的下标为" + index);
    }
}
